
\subsection{Surface area}
Let $S$ be a surface parameterized by $x$ and $y$.
That is, let $S=(x,y,z)$ where $z=f(x,y)$.
The tangent lines at a point on $S$ form a tiny parallelogram.
The area $a$ of the parallelogram is given by the magnitude of the cross product.
\begin{equation*}
a=\left|\frac{\partial S}{\partial x}\times\frac{\partial S}{\partial y}\right|
\end{equation*}

\noindent
By summing over all the parallelograms we obtain the total surface area $A$.
Hence
\begin{equation*}
A=\int\int dA=\int\int a\,dx\,dy
\end{equation*}

\noindent
The following example computes the surface area of a unit disk
parallel to the $xy$ plane.

{\color{blue}
\begin{verbatim}
z = 2
S = (x,y,z)
a = abs(cross(d(S,x),d(S,y)))
defint(a,y,-sqrt(1 - x^2),sqrt(1 - x^2),x,-1,1)
\end{verbatim}
}

\noindent
$\displaystyle \pi$

\bigskip
\noindent
The result is $\pi$, the area of a unit circle, which is what we expect.
The following example computes the surface area of $z=x^2+2y$ over
a unit square.

{\color{blue}
\begin{verbatim}
z = x^2 + 2y
S = (x,y,z)
a = abs(cross(d(S,x),d(S,y)))
defint(a,x,0,1,y,0,1)
\end{verbatim}
}

\noindent
$\displaystyle \tfrac{5}{8}\log(5)+\tfrac{3}{2}$

\bigskip
\noindent
The following exercise is from
{\it Multivariable Mathematics} by Williamson and Trotter, p. 598.
Find the area of the spiral ramp defined by
\begin{equation*}
S=\begin{bmatrix}u\cos v\\\ u\sin v\\ v\end{bmatrix},\quad 0\le u\le1,\quad 0\le v\le3\pi
\end{equation*}

{\color{blue}
\begin{verbatim}
x = u cos(v)
y = u sin(v)
z = v
S = (x,y,z)
a = circexp(abs(cross(d(S,u),d(S,v))))
defint(a,u,0,1,v,0,3pi)
\end{verbatim}
}

\noindent
$\displaystyle \frac{3\pi}{2^{1/2}}+\tfrac{3}{2}\pi\log\left(2^{1/2}+1\right)$

{\color{blue}
\begin{verbatim}
float
\end{verbatim}
}

\noindent
$\displaystyle 10.8177$
